<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>书城首页</title>
<link type="text/css" rel="stylesheet" href="static/css/style.css" >
	<style type="text/css">
		h1 {
			text-align: center;
			margin-top: 200px;
		}
	</style>
	<script src="Script/jquery.js"></script>
	<script src="Script/axios.js"></script>
	<script  type="text/javascript">
		$(function () {
			axios({
				method:"get",
				url:"http://localhost:8080/library/sessionServlet"
			}).then(function (resp) {
				var session = resp.data;
				if (session.username != null) {
					$("#in_header").html("<span>欢迎<span class=\"um_span\"></span>欢迎光临图书管理系统</span>\n" +
							"\t\t\t\t\t<a href=\"logoutServlet\" id='logout'>注销</a>&nbsp;&nbsp;\n" +
							"\t\t\t\t\t<a href=\"http://localhost:8080/library/pages/manager/book_manager.html\">图书管理</a>&nbsp;&nbsp;\n")
					$(".um_span").text(session.username)
				}else {
					$("#in_header").html("<a href=\"pages/user/login.html\">登录</a> | \n" +
							"\t\t\t\t<a href=\"pages/user/regist.html\">注册</a> &nbsp;&nbsp;\n" +
							"\t\t\t\t\t<a href=\"http://localhost:8080/library/pages/manager/book_manager.html\">图书管理</a>&nbsp;&nbsp;\n")
				}
			})
		})
	</script>
</head>
<body>
	
	<div id="header">
			<img class="logo_img" alt="" src="static/img/logo.png" >
		<span class="wel_word">图书管理系统</span>
			<div id="in_header">

			</div>
	</div>
	<div id="main">
		<h1>欢迎管理员进入后台管理系统</h1>
	</div>
	
	<div id="bottom">
		<span>
			图书管理系统.suo &copy;2022
		</span>
	</div>
</body>
</html>